<template>
        <view class="context">
                <view class="me-bg"></view>
                <view class="me-info">
                        <view class="me-face">
                                <img :src=userinfo.face alt="" />
                        </view>
                        <view class="me-name">
                                <p>{{userinfo.username}}</p >
                                <p>{{userinfo.mobile}}</p >
                        </view>
                        <view class="me-sub">
                                <view class="sub-box">
                                        <p>0</p >
                                        <p>待审核</p >
                                </view>
                                <view class="sub-box">
                                        <p>15</p >
                                        <p>待审核</p >
                                </view>
                                <view class="sub-box">
                                        <p>30</p >
                                        <p>待审核</p >
                                </view>
                                <view class="sub-box" @click="allMeetings()">
                                        <p>70</p >
                                        <p>全部会议</p >
                                </view>
                        </view>
                </view>
                <view class="me-content">
                        <view class="content-box">
                                <view class="box-icon">
                                        <p>@</p >
                                </view>
                                <view class="box-title">
                                        <p>修改密码</p >
                                </view>
                                <view class="box-icon">
                                        <p>></p >
                                </view>
                        </view>
                        <view class="content-box">
                                <view class="box-icon">
                                        <p>@</p >
                                </view>
                                <view class="box-title">
                                        <p>修改密码</p >
                                </view>
                                <view class="box-icon">
                                        <p>></p >
                                </view>
                        </view>
                        <view class="content-box" @click="logout()">
                                <view class="box-icon">
                                        <p>@</p >
                                </view>
                                <view class="box-title">
                                        <p>退出登录</p >
                                </view>
                                <view class="box-icon">
                                        <p>></p >
                                </view>
                        </view>
                </view>
        </view>
</template>

<script>
        import {
                url,
                //request
        } from '../../utils/request.js';
        export default {
                data() {
                        return {
                                userinfo: {},
                        }
                },
                onShow: function() {
                        if (uni.getStorageSync('UserInfo')) {
                                this.userinfo = uni.getStorageSync('UserInfo')
                                this.userinfo.face = url + this.userinfo.face
                        }

                },
                methods: {
                        logout() {
                                uni.removeStorageSync('UserInfo');
                                uni.reLaunch({
                                        url: '/pages/login/login'
                                });

                        },
                        allMeetings() {
                                uni.navigateTo({
                                        url: `/pages/allMeetings/allMeetings`
                                });
                        }
                }
        }
</script>

<style lang="scss">
        @import "me.css";
</style>